<?php
//tbf库其他地方使用的配置.
class TbfConfig {
    //项目根目录
    static $AppRootPath;
    //配置文件路径
    static $ConfigPath;
    //模板文件路径
    static $ViewPath;
    //临时文件路径
    static $TmpPath;
    //这个库的路径
    static $TbfPath;
    //上传文件保存的路径,不包含结尾的'/'
    static $UploadPath;
    //上传文件保存之后url的前缀,不包含结尾的'/'
    static $UploadUrlPrefix;
    //数据库配置
    static $DbHost;
    static $DbPort = 3306;
    static $DbDatabase;
    static $DbUsername;
    static $DbPassword;


    static function PhpcmsLoadDbConfig($config){
        self::$DbHost = $config['hostname'];
        self::$DbDatabase = $config['database'];
        self::$DbUsername = $config['username'];
        self::$DbPassword = $config['password'];
    }

    static function LoadDbConfig($config){
        self::$DbHost = $config['DbHost'];
        self::$DbPort = $config['DbPort'];
        self::$DbDatabase = $config['DbDatabase'];
        self::$DbUsername = $config['DbUsername'];
        self::$DbPassword = $config['DbPassword'];
    }
}